public with sharing class ShoppingListController {
	
	private final Grocery_list__c shoppingList;
	private ApexPages.StandardController stdController;
	public String listSaved {get; set;}

	public ShoppingListController(ApexPages.StandardController stdController) {
        this.shoppingList = (Grocery_list__c)stdController.getRecord();
        this.stdController = stdController;
        listSaved = '';
   	}
	
	public void myQuickSave(){
		stdController.save();
		listSaved = 'saved';
	}
	
	public List<List_line_item__c> getItemsList() {
		if (stdController.getId() == null ) {
			return null;
		}
		return [Select Id, Name from List_line_item__c where Grocery_list__c =:stdController.getId() ];
	}
}